Skip to content

feat(APP-4257): Update DataListItem to use div as a wrapper when non interactive - #501

Merged
cgero-eth merged 5 commits into
mainfrom
APP-4257-datalist-item-wrapper
Jun 17, 2025
Merged

feat(APP-4257): Update DataListItem to use div as a wrapper when non interactive#501
cgero-eth merged 5 commits into
mainfrom
APP-4257-datalist-item-wrapper

Conversation

@milosh86

@milosh86 milosh86 commented Jun 12, 2025

Copy link
Copy Markdown
Contributor

Description

Update DataListItem to use div as a wrapper when it's non interactive. Wrapper logic:

  • if href is set, wrap with link
  • if onClick is set, wrap with button
  • otherwise, wrap with div

Task: APP-4257

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Developer Checklist:

  • Manually smoke tested the functionality locally
  • Confirmed there are no new warnings or errors in the browser console
  • Made the corresponding changes to the documentation
  • Added tests that prove my fix is effective or that my feature works
  • (For User Stories only) Double-checked that all Acceptance Criteria are satisified
  • Confirmed there are no new warnings on automated tests
  • Selected the correct base branch
  • Commented the code in hard-to-understand areas
  • Followed the code style guidelines of this project
  • Reviewed that the files changed in GitHub’s UI reflect my intended changes
  • Confirmed the pipeline checks are not failing

Review Checklist:

  • Tested locally that all Acceptance Criteria or Expected Outcomes are satisfied
  • Confirmed that changes follow the code style guidelines of this project

milosh86 added 2 commits June 12, 2025 15:57
Signed-off-by: Milos Dzepina <milos@aragon.org>
Signed-off-by: Milos Dzepina <milos@aragon.org>
Signed-off-by: Milos Dzepina <milos@aragon.org>
};

if (!isLinkElement) {
if (isLinkElement) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we can remove the isSkeletonElement check above for applying the correct classes now, we introduced it to avoid displaying a pointer cursor for skeleton elements

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I double checked and I'm confident we can remove isSkeletonElement from dataListItem! I just updated default skeleton element with aria attributes as used in other "custom" skeletons.

Comment thread .changeset/slow-colts-pick.md Outdated
milosh86 and others added 2 commits June 16, 2025 11:57
Signed-off-by: Milos Dzepina <milos@aragon.org>
Co-authored-by: cgero.eth <ruggero.cino@gmail.com>
Signed-off-by: Milos Dzepina <milos@aragon.org>
@milosh86
milosh86 requested a review from cgero-eth June 16, 2025 10:02

@cgero-eth cgero-eth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

@cgero-eth
cgero-eth merged commit e9596f9 into main Jun 17, 2025
5 checks passed
@cgero-eth
cgero-eth deleted the APP-4257-datalist-item-wrapper branch June 17, 2025 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants